$setRoAttributeTo = $true Get-ChildItem -Path $folderPath | foreach { Set-ItemProperty -Path $folderPath\TestFile.txt -Name IsReadOnly -Value $setRoAttributeTo }
$setRoAttributeTo = $true Get-ChildItem -Path $folderPath | foreach { Set-ItemProperty -Path $folderPath\TestFile.txt -Name IsReadOnly -Value $setRoAttributeTo }