 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get the readonly files using Get-ChildItem in PowerShell?
To get the Readonly files with Get-ChildItem in PowerShell, you need to use the –Readonly files. Readonly file has attribute ‘r’.
In the below example, you can check the attribute of the file.
Get-ChildItem D:\Temp\ -ReadOnly
Output
PS C:\WINDOWS\system32> Get-ChildItem D:\Temp\* -ReadOnly Directory: D:\Temp Mode LastWriteTime Length Name ---- ------------- ------ ---- -ar--- 13-01-2020 18:19 0 Readonlyfile.txt
You can check the read-only attribute value in Mode property.
Advertisements
 