Tag Archives: powershell

HOWTO compact vhd/vhdx Hyper-V files

It happened that the usual compact disk from Hyper-V Console doesn’t seem to be effective on one of mine .vhdx file. Looking around on the web, I discovered that it is a quite common problem. The solution is to open a Powershell window with administrative access rights, and use the following command: optimize-vhd <offline Hyper-V disk file> -mode full For further details about this command, … Continue reading HOWTO compact vhd/vhdx Hyper-V files »

HOWTO enable Powershell script execution

Powershell is indeed a very powerful tool, and sometimes we may need to commit several similar operations that we can quickly organize in a script. By default, you cannot execute any unsigned PowerShell script.  This can be a problem if we don’t know how, or you need to do a quick maintenance task. We can bypass this setting, by opening a Powershell window with administrative … Continue reading HOWTO enable Powershell script execution »