void SetProperty(string path, INodeFactory factory, PSObject propertyValue)
{
var node = factory.GetNodeValue();
var value = node.Item;
var propDescs = TypeDescriptor.GetProperties(value);
var psoDesc = propertyValue.Properties;
var props = (from PropertyDescriptor prop in propDescs
let psod = (from pso in psoDesc
where StringComparer.InvariantCultureIgnoreCase.Equals(pso.Name, prop.Name)
select pso).FirstOrDefault()
where null != psod
select new {PSProperty = psod, Property = prop});
props.ToList().ForEach(p => p.Property.SetValue(value, p.PSProperty.Value));
}