Auto-Complete & DSCResources

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Josh Castillo Josh Castillo 5 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37190
    Profile photo of Josh Castillo
    Josh Castillo
    Participant

    Am I missing something regarding the intellisense/auto-complete and DSC Resources? I'm loading the resources into the modules folders (I've tried both both eh System32 and the Documents paths) and cannot use ctrl+space or tab to view the installed Resources. When I use Get-DSCResource all of them are listed.

    Any help is appreciated. Thanks!

    #37193
    Profile photo of Arie H
    Arie H
    Participant

    I imagine you downloaded the zip files from github and you unzipped it. Place them in the program files\powershell modules folder.
    After unzipping, I would change the inner folder name to be the version, to accommodate for multiple versions of the same resource.
    Use $env:PSModulePath to make sure its correctly showing the system32, program files and user folder

    #37211
    Profile photo of Josh Castillo
    Josh Castillo
    Participant

    I think my brain was a little tired yesterday. I didn't do much troubleshooting.

    As you suggested I looked in each entry to PSModulePath and placed my resources there. I originally pulled them down form Github (git clone –recursive ...), so the folders structure was different than you mentioned with the resource name and version number.

    To make it work, I opened the xDSCResouces folder, another DSCResource (such as xCertificate), and copied the folder contents from the subfolder DSCResource from there. In this case, MSFT_xCertReq and MSFT_xPfxImport were in this folder. After copying these to a folder form PSModulePath, intellisense worked.

    So even though Get-DSCResource can pick up all the DSCResources recursively from one of the PSModulePath directories, it seems that intellisense needs the deeper folders to be in the PSModulepath folders (specifically the folders with the psm1 & mof file.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.