ansible/test/integration/targets/win_stat/files/set_attributes.ps1
Jordan Borean 971783a7fd Feature/win stat extra info (#19148)
* Added more return results to win_stat

* Changed Win2012 methods to support older versions in setup

* staging of the tests to work with older servers
2017-01-27 14:51:12 -08:00

9 lines
208 B
PowerShell

$path = $args[0]
$attr = $args[1]
$item = Get-Item "$path"
$attributes = $item.Attributes -split ','
If ($attributes -notcontains $attr) {
$attributes += $attr
}
$item.Attributes = $attributes -join ','