Tag Archives: powershell

HOWTO enable Powershell script execution

updated: 09/10/2021   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 update this setting, by opening a Powershell … Continue reading HOWTO enable Powershell script execution »

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 my .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 »