microsoft / PowerShell-DSC-for-Linux

PowerShell Desired State Configuration - for Linux
Other
339 stars 132 forks source link

Getting error Could not find the type of DSC resource class MSFT_nxPackageResource. #870

Open Jasmsft opened 2 years ago

Jasmsft commented 2 years ago

DSC config Configuration 'aidepackageinstall' { Import-DscResource -ModuleName nx node LinuxNode {

Ensure aide package is installed

    nxpackage aidepackage {
        Ensure          = 'Present'
        Name            = 'aide'
        PackageManager  = 'Apt'
    }

} }

New-GuestConfigurationPackage -Name 'MyConfig' -Configuration 'C:\Temp\LinuxNode.mof' -Type Audit -Force

Result: Name Path


MyConfig C:\Windows\System32\MyConfig.zip

Get-GuestConfigurationPackageComplianceStatus -Path C:\Windows\System32\MyConfig.zip result: Write-Error: Job 4cd3cfb6-343d-44f7-ab8c-ec3a1c4a063f : MIResult: 6 Error Message: Could not find the type of DSC resource class MSFT_nxPackageResource. Message ID: ClassTypeNotFound Error Category: 13 Error Code: 6 Error Type: MI

image

NX module is installed and should have the MSFT_nxPackageResource class in it

briandoddscc commented 1 year ago

Hi, Did you get to the bottom of this? Brian.