Вы - более обеспеченное использование Powershell gwmi чтобы более эффективно извлечь и отформатировать данные, Вы хотите.
gwmi
http://docs.puppetlabs.com/references/latest/function.html#extlookup
extlookup is your answer. This function allows to use common value (xxx), and redeclare it only where it's really necessary.