Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to test shared path, child item and security details using Power Shell script
WhatsApp
Sushant Kesari
Jul 04
2016
1.1
k
0
0
#Test shared path is exist or correct
Test-Path
"C:\Users\john\script\"
# Using the Get-ChildItem Cmdlet
#Replicating (and Extending) the DIR Command
#In its basic form the Get-ChildItem cmdlet provides functionality similar to the dir command.
GCI
"C:\Users\john\script\"
Get-ChildItem -recurse
Get-ChildItem env:
#Retrieving the Security Descriptor for an Object
#The Get-Acl cmdlet enables you to retrieve the security descriptor (access control list) for a file, a folder, or even a registry key
Get-Acl
"C:\Users\john\script\"
| Format-List
acl
"C:\Users\john\script\"
Test shared path
get child items
Retrieving the Security Descriptor
check have read access or not
Power Shell Script
Up Next
How to test shared path, child item and security details using Power Shell script