Skip to content

Instantly share code, notes, and snippets.

@levi-turner
Created November 19, 2019 16:56
Show Gist options
  • Save levi-turner/8e3e0af00aa4b1a7ad20d8619cb2fdb8 to your computer and use it in GitHub Desktop.
Save levi-turner/8e3e0af00aa4b1a7ad20d8619cb2fdb8 to your computer and use it in GitHub Desktop.
# Change the location to the VirtualBox installdir; default is used here
Set-Location "C:\Program Files\Oracle\VirtualBox"
# Get a list of VMs
.\VBoxManage.exe list vms
# Determine the off-set required; modify date as needed
([datetime]"07/01/2019" - [datetime]::Now)
<# Example output:
PS C:\Program Files\Oracle\VirtualBox> ([datetime]"07/01/2019" - [datetime]::Now)
Days : -141
Hours : -11
Minutes : -54
Seconds : -25
Milliseconds : -889
Ticks : -122252658893519
TotalDays : -141.49613297861
TotalHours : -3395.90719148664
TotalMinutes : -203754.431489198
TotalSeconds : -12225265.8893519
TotalMilliseconds : -12225265889.3519
#>
# Change the off-set to the ms value from above
.\VBoxManage.exe modifyvm {vmname} --biossystemtimeoffset -12225265889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment