TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to test shared path, child item and security details using Power Shell script
Sushant Kesari
Jul 04
2016
Code
939
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
#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