Locate and inspect titles, descriptions, canonical declarations, and page dates.

Sheet: 23 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. Locate title declarations

Get-ChildItem -LiteralPath 'C:\MGU' -Recurse -File -Filter '*.html' |
    Select-String -Pattern '<title\b' | Select-Object Path, LineNumber, Line

2. Find candidate canonical declarations

Get-ChildItem -LiteralPath 'C:\MGU' -Recurse -File -Filter '*.html' |
    Select-String -Pattern 'rel\s*=\s*["'']canonical["'']' | Select-Object Path, LineNumber, Line

3. Find Open Graph URL declarations

Get-ChildItem -LiteralPath 'C:\MGU' -Recurse -File -Filter '*.html' |
    Select-String -Pattern 'og:url' -SimpleMatch

4. Inspect body date metadata

Select-String -LiteralPath 'C:\MGU\index.html' -Pattern 'data-uploaded','data-updated' -SimpleMatch

5. Derive expected canonical URL for a known site file

$root = 'C:\MGU'
$file = Get-Item -LiteralPath 'C:\MGU\library\index.html'
$relative = $file.FullName.Substring($root.Length + 1).Replace('\','/')
if ($file.Name -ieq 'index.html') {
    $relative = $relative.Substring(0, $relative.Length - 'index.html'.Length)
} else { $relative = $relative -replace '\.html$','' }
'https://maloneuniversity.org/' + $relative

Operational notes

MGU directory indexes use trailing-slash URLs and ordinary HTML pages use extensionless URLs. The mapping assumes safe URL-compatible filenames under the specified root. Declaration scans are heuristics; use an HTML parser and compare parsed values before changing metadata.

Official documentation