mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
10 lines
208 B
PowerShell
10 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 ','
|