Reputation:
With PowerShell, how am I able to check if I have access to a remote system (example \\SYSTEM0123\c$\
)?
Upvotes: 1
Views: 118
Reputation: 47862
You could try
it:
try {
Get-Item -Path \\SYSTEM0123\c$ -ErrorAction Stop
# if you have access these statements will run
} catch {
# Don't have access
}
Upvotes: 1