powershell - Using [array] in a class based DSC resource -
i have been creating few class based custom dsc resources , running following issue:
whenever try use array input resource, error.
for example
dscproperty(mandatory)] [array]$products
would result in following error when try create mof file using resource:
write-nodemoffile : invalid mof definition node 'nodename':
exceptioncalling "validateinstancetext" "1" argument(s):
"convert property 'products' value type 'string[]' type 'instance' failed.
the input object $products
(for example):
$products = @("windows server 2012", "windows sql server", "windows 8.1")
i have no idea why write-nodemoffile
function try convert array (it should not need converting, right?) , if needed converted - why convert array string[]
instance
?
anyone has clue why happens? way got work creating long string array of strings , seperating them within resource.
declare array :
[string[]]$product="ddd","dq","dqq"
Comments
Post a Comment