Installation issue

Apr 16, 2009 at 12:37 PM
Hello group, sorry but i am really a powershell newbie.

I copied the psxml format to c:\windows\system32\WindowsPowershell\v1.0

and next I invoke like this .\hyperv.ps1 Get-VM
It fails with :

c:\windows\system32\WindowsPowershell\v1.0\hyperv.format.ps1xml
"File skipped because it was already present from Microsoft.Powershell"

Any idea please ?

PS : execution policy is set to unrestricted.
Apr 16, 2009 at 12:46 PM
OK i figured out just had to call . .\hyperv.ps1 and then the functions are loaded properly.

but the exception
c:\windows\system32\WindowsPowershell\v1.0\hyperv.format.ps1xml
"File skipped because it was already present from Microsoft.Powershell"


still remains...
Apr 16, 2009 at 1:03 PM
Another issue

when i create a script like this

. .\hyperv.ps1
Get-VM

All i get is the VM GUIDs
Coordinator
Apr 24, 2009 at 6:50 AM
You shouldn't really load the library inside a script ... either take the code you want and put it in a script Or load the library and then run the script.

I can repro this but I can't see why it happens, I'll do a little bit more digging, because you would expect it to work
Coordinator
Apr 24, 2009 at 6:54 AM
The .ps1 file loads a formatting XML file, I haven't found a way to check if it is loaded so I've made a change which appear in the 1.0c version to hide the error if it is reloaded.
Jul 30, 2009 at 6:19 PM

Hello jamesone, can you help me with the code you added to hide the error when re-loading the formatting XML file? I looked for it in the source code but couldn't find it. Thanks!

Coordinator
Sep 3, 2009 at 5:30 PM

1.0c got delayed it will go live later today.