Issue with dsc_resource string to string[]


I am attempting to use the PowerShell DSC resource xSmbShare in a dsc_resource. It has a property that requires a powershell string array.

Using DSC directly, you would specify like this: FullAccess = @("User1")

so I attempt to use dsc_resource "" do property :FullAccess, "User1" but I get a powershell error when running the resource stating "cannot convert string to string"

So i attempted to modify this:
class WebsiteBindings
@bindings =
def initialize(bindings)
@bindings = bindings
def to_psobject()
bindings =
@bindings.each do |b|
bindings.push("(new-ciminstance -classname MSFT_xWebBindingInformation -Namespace
root/microsoft/Windows/DesiredStateConfiguration -Property @{Protocol=#{b[:protocol]};IPAddress=#
{b[:ip]};Port=#{b[:port]}} -ClientOnly)")
bindings =[
{ protocol: 'HTTP', ip:'', port: 8080},
{ protocol: 'HTTP', ip: '', port: 8081} ])

To just create a powershell string array rather than an array of powershell ciminstances, but I am unable to get it to work.

Any suggestions?


I have several DSC resources that I've used where certain properties have required array values. In these instances, I simply wrapped the values in brackets '[' ']' within the dsc_resource construct, which is the way to express array literals in Ruby. Have you given that a try?


This has at least changed the error. Thank you for the help. Should have looked for the simple solution before the complex one.