Task Scheduler – Mount VHD and Mark Online Read/Write Mode – Powershell

Some helpful code. I needed to mount a VHDX on System Startup with a Scheduled Task, and have it automatically mount the drive into a writable state, since by default,  Mount-VHD mounts in read-only mode, and with disk status offline. Save the code into a .PS1 file, call it upon system startup. Code below. #######Mount […]