使用“ConvertTo-Json”时,Powershell 会自动将所有日期时间字段转换为纪元时间。有没有办法防止这种情况发生或将其更改回人类可读的日期时间?例如,检查输出中的一些字段
命令:
Get-LocalUser | ConvertTo-Json
输出:
"PasswordChangeableDate": "\/Date(1597311158786)\/",
"PasswordExpires": null,
"UserMayChangePassword": true,
"PasswordRequired": true,
"PasswordLastSet": "\/Date(1597224758786)\/",
"LastLogon": "\/Date(1597238163431)\/",
有没有办法阻止 Powershell 将上述字段转换为纪元时间,或者将它们转换回人类可读的日期时间?