Quantcast
Channel: Active questions tagged powershell-3.0 - Stack Overflow
Viewing all articles
Browse latest Browse all 129

Error: does not contain a method named op_addition

$
0
0

I'm trying to remove everyone's Chrome cache directory with the following script but it keeps failing on this ridiculous error that makes no sense at all.

method invocation failed because system.io.directoryinfo does not contain a method named op_addition

Even when I just write the $loc to the console window I get the error. What am I doing wrong here?

$path = Get-ChildItem C:\Users\*\ | ?{ $_.PSIsContainer }ForEach ($folder in $path) {    $loc = $folder +"\AppData\Local\Google\Chrome\User Data\Default\Cache"#   Remove-Item $loc    Write-Host $loc}

Viewing all articles
Browse latest Browse all 129

Trending Articles