Hello all,
Iam getting the following error when i use $acc=(get-acl $file).Access
$file is a obtained from a database with the following query:
foreach ($file in Invoke-Sqlcmd -Query "select FO_ID,FULL_PATH from dbo.$T_FOLDERS" -ServerInstance "xxx\xxx" -Database "xxx" |select -ExpandProperty FULL_PATH)
ERROR:
get-acl : Cannot find path '\\fileshare\test\Share\' because it does not exist.
At line:17 char:11
+ $acc=(get-acl $file).Access
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Get-Acl], ItemNotFoundException
+ FullyQualifiedErrorId : GetAcl_PathNotFound_Exception,Microsoft.PowerShell.Commands.GetAclCommand
Can anyone help me with this one?
Regards,
Arestas