Author Posts

December 23, 2016 at 1:24 am

I'm using xHyper-V module and installed with

Find-Module -Name xHyper-V -Repository PSGallery|Install-Module

When I run

Get-DscResource

it finds it OK:

PS C:\> Get-DscResource -Module xhyper-v

ImplementedAs   Name                      ModuleName                     Version    Properties
-------------   ----                      ----------                     -------    ----------
PowerShell      xVHD                      xHyper-V                       3.6.0.0    {Name, Path, DependsOn, Ensure...}
PowerShell      xVhdFile                  xHyper-V                       3.6.0.0    {FileDirectory, VhdPath, CheckSum, DependsOn...}
PowerShell      xVMHyperV                 xHyper-V                       3.6.0.0    {Name, VhdPath, DependsOn, EnableGuestService...}
PowerShell      xVMSwitch                 xHyper-V                       3.6.0.0    {Name, Type, AllowManagementOS, BandwidthReserv...

When I run my script, the mof file gets created fine but it can't find the module with this error:

The PowerShell DSC resource MSFT_xVMHyperV from module  does not exist at the PowerShell module path nor is it registered as
a WMI DSC resource.
    + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : DscResourceNotFound
    + PSComputerName        : lithium

I've rebooted my workstation since installing the module but it's not working. The previous version 3.5 was working, but I uninstalled that and installed the latest. Any ideas?