spottedmahn
spottedmahn

Reputation: 15981

Get-Acl on a Mapped Drive?

Is there a limitation to Get-Acl in that it doesn't work with mapped drives?

When I run it against C:\Test, it works fine. When I run against a mapped drive I get:

Get-Acl : Method failed with unexpected error code 50.
At line:1 char:1
+ Get-Acl U:\Themes
+ ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Acl], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.GetAclCommand

Upvotes: 0

Views: 1380

Answers (3)

Lewis McKee
Lewis McKee

Reputation: 21

Try this to get the security tab to show under properties:+ Control Panel>Folder Options>View tab - uncheck "use simple file sharing"

Upvotes: 0

spottedmahn
spottedmahn

Reputation: 15981

When I view the properties of the folder in Explorer, I don't see the security tab. I thought I could always see the security tab... guess not.

properties screenshot

Upvotes: 0

Lewis McKee
Lewis McKee

Reputation: 21

The cmdlet Get-ACL can only operate on drives available to Powershell. Check your Powershell drives with this cmdlet:

Get-PSDrive

Add a network drive for Powershell like this:

New-PSDrive -Name "Z" -PSProvider FileSystem -Root \\server\share1

Now Retry:

Get-ACL Z:\

Upvotes: 1

Related Questions