Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

NTFSSecurity.format.ps1xml 16 KiB

7 anni fa
7 anni fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!--<Configuration xmlns="http://schemas.microsoft.com/PowerShell/FormatData/2007/09">-->
  3. <Configuration>
  4. <SelectionSets>
  5. <SelectionSet>
  6. <Name>FileSystemTypes2</Name>
  7. <Types>
  8. <TypeName>Alphaleonis.Win32.Filesystem.DirectoryInfo</TypeName>
  9. <TypeName>Alphaleonis.Win32.Filesystem.FileInfo</TypeName>
  10. </Types>
  11. </SelectionSet>
  12. </SelectionSets>
  13. <!-- ################ GLOBAL CONTROL DEFINITIONS ################ -->
  14. <Controls>
  15. <Control>
  16. <Name>SimpleFileSystemGrouping</Name>
  17. <CustomControl>
  18. <CustomEntries>
  19. <CustomEntry>
  20. <CustomItem>
  21. <Frame>
  22. <LeftIndent>4</LeftIndent>
  23. <CustomItem>
  24. <ExpressionBinding>
  25. <ScriptBlock>
  26. if ($global:tempFullName -ne $_.FullName)
  27. {
  28. "Path: $($_.FullName) (Inheritance $(if ($_.InheritanceEnabled) { "enabled" } else { "disabled" }))"
  29. $global:FullName = $_.FullName
  30. }
  31. </ScriptBlock>
  32. </ExpressionBinding>
  33. <NewLine/>
  34. </CustomItem>
  35. </Frame>
  36. </CustomItem>
  37. </CustomEntry>
  38. </CustomEntries>
  39. </CustomControl>
  40. </Control>
  41. <Control>
  42. <Name>SimpleFileSystemAccessRule2Grouping</Name>
  43. <CustomControl>
  44. <CustomEntries>
  45. <CustomEntry>
  46. <CustomItem>
  47. <Frame>
  48. <LeftIndent>4</LeftIndent>
  49. <CustomItem>
  50. <ExpressionBinding>
  51. <ScriptBlock>
  52. if ($global:tempFullName -ne $_.FullName)
  53. {
  54. "Path: $($_.FullName)"
  55. $global:FullName = $_.FullName
  56. }
  57. </ScriptBlock>
  58. </ExpressionBinding>
  59. <NewLine/>
  60. </CustomItem>
  61. </Frame>
  62. </CustomItem>
  63. </CustomEntry>
  64. </CustomEntries>
  65. </CustomControl>
  66. </Control>
  67. <Control>
  68. <Name>FileSystemTypes2-GroupingFormat</Name>
  69. <CustomControl>
  70. <CustomEntries>
  71. <CustomEntry>
  72. <CustomItem>
  73. <Frame>
  74. <LeftIndent>4</LeftIndent>
  75. <CustomItem>
  76. <Text AssemblyName="System.Management.Automation" BaseName="FileSystemProviderStrings" ResourceId="DirectoryDisplayGrouping"/>
  77. <ExpressionBinding>
  78. <ScriptBlock>
  79. Split-Path -Path $_.FullName -Parent
  80. </ScriptBlock>
  81. </ExpressionBinding>
  82. <NewLine/>
  83. </CustomItem>
  84. </Frame>
  85. </CustomItem>
  86. </CustomEntry>
  87. </CustomEntries>
  88. </CustomControl>
  89. </Control>
  90. </Controls>
  91. <!-- ################ VIEW DEFINITIONS ################ -->
  92. <ViewDefinitions>
  93. <View>
  94. <Name>Security2.FileSystemAccessRule2</Name>
  95. <ViewSelectedBy>
  96. <TypeName>Security2.FileSystemAccessRule2</TypeName>
  97. </ViewSelectedBy>
  98. <GroupBy>
  99. <PropertyName>FullName</PropertyName>
  100. <CustomControlName>SimpleFileSystemGrouping</CustomControlName>
  101. </GroupBy>
  102. <TableControl>
  103. <TableHeaders>
  104. <TableColumnHeader>
  105. <Width>35</Width>
  106. <Label>Account</Label>
  107. </TableColumnHeader>
  108. <TableColumnHeader>
  109. <Label>Access Rights</Label>
  110. </TableColumnHeader>
  111. <TableColumnHeader>
  112. <Width>25</Width>
  113. <Label>Applies to</Label>
  114. </TableColumnHeader>
  115. <TableColumnHeader>
  116. <Label>Type</Label>
  117. </TableColumnHeader>
  118. <TableColumnHeader>
  119. <Label>IsInherited</Label>
  120. </TableColumnHeader>
  121. <TableColumnHeader>
  122. <Label>InheritedFrom</Label>
  123. </TableColumnHeader>
  124. </TableHeaders>
  125. <TableRowEntries>
  126. <TableRowEntry>
  127. <TableColumnItems>
  128. <TableColumnItem>
  129. <ScriptBlock>
  130. if ((Get-Module NTFSSecurity).PrivateData.ShowAccountSid)
  131. {
  132. '{0} ({1})' -f $_.Account.AccountName, $_.Account.Sid
  133. }
  134. else
  135. {
  136. $_.Account.ToString()
  137. }
  138. </ScriptBlock>
  139. </TableColumnItem>
  140. <TableColumnItem>
  141. <PropertyName>AccessRights</PropertyName>
  142. </TableColumnItem>
  143. <TableColumnItem>
  144. <ScriptBlock>
  145. [Security2.FileSystemSecurity2]::ConvertTo
  146. ($_.InheritanceFlags, $_.PropagationFlags)
  147. </ScriptBlock>
  148. </TableColumnItem>
  149. <TableColumnItem>
  150. <PropertyName>AccessControlType</PropertyName>
  151. </TableColumnItem>
  152. <TableColumnItem>
  153. <PropertyName>IsInherited</PropertyName>
  154. </TableColumnItem>
  155. <TableColumnItem>
  156. <PropertyName>InheritedFrom</PropertyName>
  157. </TableColumnItem>
  158. </TableColumnItems>
  159. </TableRowEntry>
  160. </TableRowEntries>
  161. </TableControl>
  162. </View>
  163. <View>
  164. <Name>Security2.FileSystemAuditRule2</Name>
  165. <ViewSelectedBy>
  166. <TypeName>Security2.FileSystemAuditRule2</TypeName>
  167. </ViewSelectedBy>
  168. <GroupBy>
  169. <PropertyName>FullName</PropertyName>
  170. <CustomControlName>SimpleFileSystemGrouping</CustomControlName>
  171. </GroupBy>
  172. <TableControl>
  173. <TableHeaders>
  174. <TableColumnHeader>
  175. <Width>35</Width>
  176. <Label>Account</Label>
  177. </TableColumnHeader>
  178. <TableColumnHeader>
  179. <Label>Access Rights</Label>
  180. </TableColumnHeader>
  181. <TableColumnHeader>
  182. <Width>25</Width>
  183. <Label>Applies to</Label>
  184. </TableColumnHeader>
  185. <TableColumnHeader>
  186. <Label>Type</Label>
  187. </TableColumnHeader>
  188. <TableColumnHeader>
  189. <Label>IsInherited</Label>
  190. </TableColumnHeader>
  191. <TableColumnHeader>
  192. <Label>InheritedFrom</Label>
  193. </TableColumnHeader>
  194. </TableHeaders>
  195. <TableRowEntries>
  196. <TableRowEntry>
  197. <TableColumnItems>
  198. <TableColumnItem>
  199. <ScriptBlock>
  200. if ((Get-Module NTFSSecurity).PrivateData.ShowAccountSid)
  201. {
  202. '{0} ({1})' -f $_.Account.AccountName, $_.Account.Sid
  203. }
  204. else
  205. {
  206. $_.Account.ToString()
  207. }
  208. </ScriptBlock>
  209. </TableColumnItem>
  210. <TableColumnItem>
  211. <PropertyName>AccessRights</PropertyName>
  212. </TableColumnItem>
  213. <TableColumnItem>
  214. <ScriptBlock>
  215. [Security2.FileSystemSecurity2]::ConvertToApplyTo($_.InheritanceFlags, $_.PropagationFlags)
  216. </ScriptBlock>
  217. </TableColumnItem>
  218. <TableColumnItem>
  219. <PropertyName>AuditFlags</PropertyName>
  220. </TableColumnItem>
  221. <TableColumnItem>
  222. <PropertyName>IsInherited</PropertyName>
  223. </TableColumnItem>
  224. <TableColumnItem>
  225. <PropertyName>InheritedFrom</PropertyName>
  226. </TableColumnItem>
  227. </TableColumnItems>
  228. </TableRowEntry>
  229. </TableRowEntries>
  230. </TableControl>
  231. </View>
  232. <View>
  233. <Name>Security2.SimpleFileSystemAuditRule2</Name>
  234. <ViewSelectedBy>
  235. <TypeName>Security2.SimpleFileSystemAuditRule2</TypeName>
  236. </ViewSelectedBy>
  237. <GroupBy>
  238. <PropertyName>FullName</PropertyName>
  239. <CustomControlName>SimpleFileSystemGrouping</CustomControlName>
  240. </GroupBy>
  241. <TableControl>
  242. <TableHeaders>
  243. <TableColumnHeader>
  244. <Width>35</Width>
  245. <Label>Account</Label>
  246. </TableColumnHeader>
  247. <TableColumnHeader>
  248. <Label>Access Rights</Label>
  249. </TableColumnHeader>
  250. <TableColumnHeader>
  251. <Width>25</Width>
  252. <Label>Applies to</Label>
  253. </TableColumnHeader>
  254. <TableColumnHeader>
  255. <Label>Type</Label>
  256. </TableColumnHeader>
  257. <TableColumnHeader>
  258. <Label>IsInherited</Label>
  259. </TableColumnHeader>
  260. </TableHeaders>
  261. <TableRowEntries>
  262. <TableRowEntry>
  263. <Wrap/>
  264. <TableColumnItems>
  265. <TableColumnItem>
  266. <ScriptBlock>
  267. if ((Get-Module NTFSSecurity).PrivateData.ShowAccountSid)
  268. {
  269. '{0} ({1})' -f $_.Account.AccountName, $_.Account.Sid
  270. }
  271. else
  272. {
  273. $_.Account.ToString()
  274. }
  275. </ScriptBlock>
  276. </TableColumnItem>
  277. <TableColumnItem>
  278. <PropertyName>AccessRights</PropertyName>
  279. </TableColumnItem>
  280. <TableColumnItem>
  281. <ScriptBlock>
  282. [Security2.FileSystemSecurity2]::ConvertToApplyTo($_.InheritanceFlags, $_.PropagationFlags)
  283. </ScriptBlock>
  284. </TableColumnItem>
  285. <TableColumnItem>
  286. <PropertyName>AuditFlags</PropertyName>
  287. </TableColumnItem>
  288. <TableColumnItem>
  289. <PropertyName>IsInherited</PropertyName>
  290. </TableColumnItem>
  291. </TableColumnItems>
  292. </TableRowEntry>
  293. </TableRowEntries>
  294. </TableControl>
  295. </View>
  296. <View>
  297. <Name>Security2.FileSystemEffectivePermissionEntry</Name>
  298. <ViewSelectedBy>
  299. <TypeName>Security2.FileSystemEffectivePermissionEntry</TypeName>
  300. </ViewSelectedBy>
  301. <TableControl>
  302. <AutoSize/>
  303. <TableHeaders>
  304. <TableColumnHeader>
  305. <Label>Name</Label>
  306. </TableColumnHeader>
  307. <TableColumnHeader>
  308. <Label>Access</Label>
  309. </TableColumnHeader>
  310. <TableColumnHeader>
  311. <Label>AccessMask</Label>
  312. </TableColumnHeader>
  313. <TableColumnHeader>
  314. <Label>Account</Label>
  315. </TableColumnHeader>
  316. </TableHeaders>
  317. <TableRowEntries>
  318. <TableRowEntry>
  319. <TableColumnItems>
  320. <TableColumnItem>
  321. <PropertyName>Name</PropertyName>
  322. </TableColumnItem>
  323. <TableColumnItem>
  324. <PropertyName>AccessAsString</PropertyName>
  325. </TableColumnItem>
  326. <TableColumnItem>
  327. <PropertyName>AccessMask</PropertyName>
  328. </TableColumnItem>
  329. <TableColumnItem>
  330. <ScriptBlock>
  331. if ((Get-Module NTFSSecurity).PrivateData.ShowAccountSid)
  332. {
  333. '{0} ({1})' -f $_.Account.AccountName, $_.Account.Sid
  334. }
  335. else
  336. {
  337. $_.Account.ToString()
  338. }
  339. </ScriptBlock>
  340. </TableColumnItem>
  341. </TableColumnItems>
  342. </TableRowEntry>
  343. </TableRowEntries>
  344. </TableControl>
  345. </View>
  346. <View>
  347. <Name>Security2.FileSystemInheritanceInfo</Name>
  348. <ViewSelectedBy>
  349. <TypeName>Security2.FileSystemInheritanceInfo</TypeName>
  350. </ViewSelectedBy>
  351. <TableControl>
  352. <AutoSize/>
  353. <TableHeaders>
  354. <TableColumnHeader>
  355. <Label>Name</Label>
  356. </TableColumnHeader>
  357. <TableColumnHeader>
  358. <Label>AccessInheritanceEnabled</Label>
  359. </TableColumnHeader>
  360. <TableColumnHeader>
  361. <Label>AuditInheritanceEnabled</Label>
  362. </TableColumnHeader>
  363. </TableHeaders>
  364. <TableRowEntries>
  365. <TableRowEntry>
  366. <TableColumnItems>
  367. <TableColumnItem>
  368. <PropertyName>Name</PropertyName>
  369. </TableColumnItem>
  370. <TableColumnItem>
  371. <PropertyName>AccessInheritanceEnabled</PropertyName>
  372. </TableColumnItem>
  373. <TableColumnItem>
  374. <PropertyName>AuditInheritanceEnabled</PropertyName>
  375. </TableColumnItem>
  376. </TableColumnItems>
  377. </TableRowEntry>
  378. </TableRowEntries>
  379. </TableControl>
  380. </View>
  381. <View>
  382. <Name>Children2</Name>
  383. <ViewSelectedBy>
  384. <SelectionSetName>FileSystemTypes2</SelectionSetName>
  385. </ViewSelectedBy>
  386. <GroupBy>
  387. <ScriptBlock>if ($_.DirectoryName) { $_.DirectoryName } else { $_.Parent.FullName }</ScriptBlock>
  388. <CustomControlName>FileSystemTypes2-GroupingFormat</CustomControlName>
  389. </GroupBy>
  390. <TableControl>
  391. <TableHeaders>
  392. <TableColumnHeader>
  393. <Label>Mode</Label>
  394. <Width>7</Width>
  395. <Alignment>Left</Alignment>
  396. </TableColumnHeader>
  397. <TableColumnHeader>
  398. <Label>Inherits</Label>
  399. <Width>8</Width>
  400. <Alignment>Right</Alignment>
  401. </TableColumnHeader>
  402. <TableColumnHeader>
  403. <Label>LastWriteTime</Label>
  404. <Width>25</Width>
  405. <Alignment>Right</Alignment>
  406. </TableColumnHeader>
  407. <TableColumnHeader>
  408. <Label>Size(M)</Label>
  409. <Width>15</Width>
  410. <Alignment>Right</Alignment>
  411. </TableColumnHeader>
  412. <TableColumnHeader>
  413. <Label>Name</Label>
  414. </TableColumnHeader>
  415. </TableHeaders>
  416. <TableRowEntries>
  417. <TableRowEntry>
  418. <Wrap/>
  419. <TableColumnItems>
  420. <TableColumnItem>
  421. <PropertyName>Mode</PropertyName>
  422. </TableColumnItem>
  423. <TableColumnItem>
  424. <ScriptBlock>
  425. !$_.IsInheritanceBlocked
  426. </ScriptBlock>
  427. </TableColumnItem>
  428. <TableColumnItem>
  429. <ScriptBlock>
  430. [String]::Format("{0,10} {1,8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t"))
  431. </ScriptBlock>
  432. </TableColumnItem>
  433. <TableColumnItem>
  434. <ScriptBlock>
  435. if ($_ -is [Alphaleonis.Win32.Filesystem.FileInfo])
  436. {
  437. [Math]::Round($_.Length / 1MB, 2).ToString()
  438. }
  439. else
  440. {
  441. " {0,-13}" -f "&lt;DIR&gt;"
  442. }
  443. </ScriptBlock>
  444. </TableColumnItem>
  445. <TableColumnItem>
  446. <PropertyName>Name</PropertyName>
  447. </TableColumnItem>
  448. </TableColumnItems>
  449. </TableRowEntry>
  450. </TableRowEntries>
  451. </TableControl>
  452. </View>
  453. <View>
  454. <Name>Alphaleonis.Win32.Filesystem.FileInfo+Hash</Name>
  455. <ViewSelectedBy>
  456. <TypeName>Alphaleonis.Win32.Filesystem.FileInfo+Hash</TypeName>
  457. </ViewSelectedBy>
  458. <TableControl>
  459. <AutoSize/>
  460. <TableHeaders>
  461. <TableColumnHeader>
  462. <Label>Algorithm</Label>
  463. </TableColumnHeader>
  464. <TableColumnHeader>
  465. <Label>Hash</Label>
  466. </TableColumnHeader>
  467. <TableColumnHeader>
  468. <Label>FullName</Label>
  469. </TableColumnHeader>
  470. </TableHeaders>
  471. <TableRowEntries>
  472. <TableRowEntry>
  473. <Wrap/>
  474. <TableColumnItems>
  475. <TableColumnItem>
  476. <PropertyName>Algorithm</PropertyName>
  477. </TableColumnItem>
  478. <TableColumnItem>
  479. <PropertyName>Hash</PropertyName>
  480. </TableColumnItem>
  481. <TableColumnItem>
  482. <PropertyName>FullName</PropertyName>
  483. </TableColumnItem>
  484. </TableColumnItems>
  485. </TableRowEntry>
  486. </TableRowEntries>
  487. </TableControl>
  488. </View>
  489. </ViewDefinitions>
  490. </Configuration>