Import-Module HyperV works, still prompts for"yes"

Jun 29, 2010 at 1:34 AM

Hello folks, thanks again for this wonderful wrapper.

I am quite a newbie to powershell v2 (running on Windows 2008 SP2) 

My execution policy is set to unrestricted, however when i run import-module HyperV in the current host all users profile ps1 file, i get security warnings, prompting me to say "Y" to all members of the module

i tried "| echo "Y" but it does not work.

My final goal is to run seamlessly, silently a powershell script to export VM once a month in a windows scheduled task

Is it possible ? Am i missing something ?

Thanks in advance for your answers !

Jul 23, 2010 at 7:08 PM

I had the same problem and resolved it by going to the folder that was created by the install.cmd "C:\Program Files\modules\HyperV", right click each file in turn and select "Unblock"

After this I could import the module with no warnings.