This line here:

$wmiFileSecSetting.GetSecurityDescriptor(wmiSecurityDescriptor)

is a Kixtart killer - was reading-up on this on MSDN and the GetSecurityDescriptor method takes a single [out] parameter. afaik Kixtart doesn't support this. I tried faking it by passing an initialized security descriptor object to it - no worky (although it didn't complain about it either).