DSC resource does not exist at the Powershell module path

This topic contains 1 reply, has 1 voice, and was last updated by  Mark Allison 10 months ago.

  • Author
    Posts
  • #60772

    Mark Allison
    Participant

    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?

  • #60801

    Mark Allison
    Participant

You must be logged in to reply to this topic.