Skip to content

Cannot validate argument on parameter 'Id'. The argument is null or empty. #326

@MaBauMeBad

Description

@MaBauMeBad

Hi,

i try for the first time the vSphere DSC Module.

Everytime i pipe my VMDSC Configuration Object to Start-VmwDscConfiguration , i receive the following Exception:

PS > $config | Start-VmwDscConfiguration Exception: C:\Program Files\WindowsPowerShell\Modules\VMware.PSDesiredStateConfiguration\1.0.0.16\Classes\Public\DscConfigurationRunner.ps1:203 Line | 203 | throw $dscResourceErrorMessage | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Set method of DatacenterFolder DSC Resource failed with the following error: Cannot validate argument | on parameter 'Id'. The argument is null or empty. Provide an argument that is not null or empty, and | then try the command again.

Is this the Exception mentioned at LIMITATIONS ?

Used Sample DSC:
`Configuration Test {
Import-DscResource -ModuleName 'VMware.vSphereDSC'

vSphereNode 'vCENTERNAME' {
    DatacenterFolder "test" {
        Name = 'test'
        Location = ''
        Ensure = 'Present'
    }

    Datacenter "MyDatacenter" {
        Name = 'MyDatacenter'
        Location = 'test'
        Ensure = 'Present'
        DependsOn = "[DatacenterFolder]test"
    }
}

}`

Setup:
PowerShell Core Version 7.1.3 on Windows 10
PowerCLI Version 12.3
VMware.vSphereDSC Module Version 2.2.0.84
VMware.PSDesiredStateConfiguration Version 1.0.0.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions