I have a hash table here and I have it eventually outputting to an Excel spreadsheet, but the issue appears to be the way the system sorts the hash table by default. I want
Create $machineUptime as an ordered hashtable (provided you have PowerShell v3 or newer):
$machineUptime
$machineUptime = [ordered]@{}