Hi:
I have the following script that attemps to read computer names from a file and
then connect to those computers to remove a folder and its subfolders.
When I run
Get-Content -path c:\list.txt | foreach {
Remove-Item -path "c:\Program Files\test" -recurse
}
I get this error:
Remove-Item : Cannot find path 'C:\Program Files\test' because it does not exist.
At line:2 char:12
The folder is there but still says it cannot find it.
Any help will be apprecieated.
Thanks,
riosf