PowerShell Rename Hashtable Properties
This is a brief demonstration of how we can rename property names uniformly across a hash table, effectively renaming the “Column Name” that will be output if we generate a CSV. $Data = Get-Content -Path ~\jsonextract.json | ConvertFrom-Json -AsHashtable foreach($D in $Data) { $D.newPropertyName = $D.oldPropertyName; $D.Remove("oldPropertyName"); }