2 versions of xPSDesiredStateConfiguration RRS feed

  • Question

  • Hi,

    I am using PS 5.1 on Win 10 Enterprise. I am currently going through the DSC Training on MVA.
    I am at the HTTP Pull Server Script section.

    I have installed the xPSDesiredStateConfiguration Module using OneGet.
    In the script i get a red line under:

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration

    The error: Multiple versions of the module 'xPSDesiredStateConfiguration' were found. You can run Get-Module -ListAvailable -FullyQualifiedName xPSDesiredStateConfiguration to see available versions on the system, and then use the fully qualified name '@{ModuleName="xPSDesiredStateConfiguration";RequiredVersion="Version"}'

    When i run:

    PS C:\Windows\system32> Get-Module -ListAvailable -FullyQualifiedName xPSDesiredStateConfiguration
        Directory: C:\Program Files\WindowsPowerShell\Modules
    ModuleType Version    Name                                ExportedCommands                                                                    
    ---------- -------    ----                                ----------------                                                                    
    Script    xPSDesiredStateConfiguration        {Publish-MOFToPullServer, Publish-DSCModuleAndMof, Publish-ModuleToPullServer}      
    Manifest    xPSDesiredStateConfiguration                                                                                            

    I am also getting a red line under xDSCWebService
    Undefined DSC resource 'xDscWebService'. Use Import-DSC-Resource to import the resource.

    When i run:

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration

    I get error: The term 'Import-DSCResource' is not recognised as the name of a cmdlet, function, script file or operable program.

    I am confused here.
    1. Why is there v3 and v7 of xPSDesiredStateConfiguration. Is v3 built into the system how can i remove it?
    2. Do I still need to OneGet this xPSDesiredStateConfiguration Module or is this now built into Win10/PS5.1?
    3. On PowerShell Gallery there is a module PSDscResources, do I need this and how does it differ to xPSDesiredStateConfiguration.
    4. How can I check what functions and cmdlets are in these new modules is there a cmdlet in PS I can run to view them all or get help on them to show examples?

    Your help is appreciated

    Monday, August 28, 2017 12:51 PM

All replies

  • try to check folder
    C:\Program Files\WindowsPowerShell\Modules
    and remove old version of problematic modules and after that upgrade your modules from repository

    The opinion expressed by me is not an official position of Microsoft

    Monday, June 11, 2018 4:58 PM