user2953762
user2953762

Reputation:

How do I check if I have admin access to a remote system?

With PowerShell, how am I able to check if I have access to a remote system (example \\SYSTEM0123\c$\)?

Upvotes: 1

Views: 118

Answers (1)

briantist
briantist

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

Related Questions