Attributes
Set-ItemProperty <file> -Name Attributes -Value ([System.IO.FileAttributes]::ReadOnly)$attributes = (Get-Item <Path\FileName>).Attributes -band (-bnot [System.IO.FileAttributes]::ReadOnly)Set-ItemProperty <Path\FileName> -Name Attributes -Value $attributes$attributes = (Get-Item <Path\FileName>).Attributes -bor [System.IO.FileAttributes]::Hidden -bor [System.IO.FileAttributes]::SystemSet-ItemProperty <Path\FileName> -Name Attributes -Value $attributesLast updated