Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

simple script not working

$
0
0

I'm trying to pass a list of values through a simple command.  I have shortened my script to show where my error is.

----------------------------

clear

$computerlist = import-csv C:\SMALL.csv

foreach ($storepos in $computerlist)

{

Get-ACL $storepos

---------------------------------

ERROR i'm getting:

Get-ACL : Cannot find path '@{storepos=\\computername\c$\SQLBackups\}'

----------------------------------

SMALL.csv is this

storepos,

\\computername\c$\SQLBackups\,

\\computername_a\c$\SQLBackups\,

\\computername_b\c$\SQLBackups\,

\\computername_c\c$\SQLBackups\,

\\computername_d\c$\SQLBackups\,

 

Why doesn't the value $storepos = \\computername\c$\SQLBackups ?

 

Thanks in advance


Viewing all articles
Browse latest Browse all 6937

Trending Articles