PowerShell 以毫秒为单位的时间戳

$currentTime = Get-Date
$currentTimestamp = [System.Convert]::ToInt64($currentTime.ToUniversalTime().Subtract((Get-Date "1/1/1970")).TotalMilliseconds)
Write-Host "current timestamp : $currentTimestamp"

你可能感兴趣的:(PowerShell,powershell)