Inspect metadata, sizes, attributes, and timestamps without changing files.

Sheet: 06 of 25 | Platform: Windows 10/11 | Shell: PowerShell 7.x and Windows PowerShell 5.1 (unless marked otherwise) | Editorial review: November 24, 2026

PowerShell cheat sheet index

Examples use the MGU project root and illustrative staging, backup, and download paths. Replace them with existing, approved paths as needed. Unless explicitly marked as a continuation, examples are independent. Read commands before running them; commands that write or modify files can change existing data.

Quick commands

1. Inspect an exact file

Get-Item -LiteralPath 'C:\MGU\index.html' | Format-List *

2. Show standard inventory columns

Get-ChildItem -LiteralPath 'C:\MGU' -File |
    Select-Object Name, Extension, Length, CreationTime, LastWriteTime

3. Calculate file size in MiB

Get-ChildItem -LiteralPath 'C:\MGU' -Recurse -File |
    Select-Object FullName, @{Name='MiB';Expression={[math]::Round($_.Length / 1MB, 2)}}

4. Find files larger than 10 MiB

Get-ChildItem -LiteralPath 'C:\MGU' -Recurse -File |
    Where-Object { $_.Length -gt 10MB }

5. Inspect hidden and read-only attributes

Get-ChildItem -LiteralPath 'C:\MGU' -Force |
    Select-Object Name, Attributes

6. Inspect the object model

Get-Item -LiteralPath 'C:\MGU\index.html' | Get-Member

Operational notes

Length is a file size in bytes, not a recursive directory size. PowerShell's 1MB constant equals 1,048,576 bytes (one MiB). Format-List is for display, not subsequent data processing.

Official documentation